
import org.junit.After
import org.junit.Before
import org.junit.Test
import org.openqa.selenium.By
import org.openqa.selenium.WebDriver
import org.openqa.selenium.WebElement
import org.openqa.selenium.firefox.FirefoxDriver
import org.openqa.selenium.interactions.Actions

class UserInteractionExerciseTest {

    static WebDriver driver
    static WebElement form

    @Before
    void createDriver() {
        driver = new FirefoxDriver()
        driver.navigate().to("http://compendiumdev.co.uk/selenium/basic_html_form.html")
        form = driver.findElement(By.cssSelector("input[type='submit']"))
    }

    @Test
    void shouldUseActionsApi()
    {
        new Actions(driver).click(driver.findElement(By.cssSelector("input[value='cb1]"))).perform()
    }

    @After
    void quitDriver() {
        driver.quit()
    }

}

